﻿using System;
using Socium.Presentation;

namespace Socium.TestEditor {
	class DialogFormViewService : IFormViewService {
		public void Show(IFormViewModel view_model) {
			var window = new CommonDialogWindow {DataContext = view_model};
			
			Action close = window.Close;
			view_model.Canceled += close;
			view_model.Saved += close;
			
			window.ShowDialog();
		}
	}
}
